﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

using HadronData;

namespace Hadron.SpecialEffects
{
    class RescuedScientist
        : SpecialEffect
    {
        private Vector2 m_vecPosition;

        public RescuedScientist(Vector2 p_vecPosition)
        {
            m_vecPosition = p_vecPosition;
            m_fLifetime = 2.0f;
        }

        public override void Update(GameTime p_gameTime)
        {
            float fDeltaTime = (float)p_gameTime.ElapsedGameTime.TotalSeconds;

            m_fLifetime = Math.Max(0.0f, m_fLifetime - fDeltaTime);

            m_vecPosition.Y -= fDeltaTime * 32.0f;
        }

        public override void Draw(SpriteBatch p_spriteBatch)
        {
            p_spriteBatch.DrawString(AssetManager.Fonts.Title, "+1", m_vecPosition, new Color(Color.White, m_fLifetime * 0.5f));
        }
    }
}
